<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/layout/page/form/page-fieldset-template.xhtml">

	<ui:param name="pvb" value="#{commonContentViewBean.parent}" />
	<ui:param name="pageViewBean" value="#{commonContentViewBean}" />
	<ui:param name="compId" value="#{pageViewBean.id}" />
	<ui:param name="compTitle" value="编辑通告" />
	<ui:param name="compToggleable" value="true" />

	<ui:define name="compContent">
		<ui:decorate template="/layout/input/editable-template.xhtml">
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compBean1Id" value="parentTitle" />
				<ui:param name="compBean2Id" value="subTitle" />
				<ui:param name="compBean1Lable" value="主标题" />
				<ui:param name="compBean2Lable" value="副标题" />
				<ui:define name="compBean1Content">
			    	<h:inputText id="parentTitle" value="#{pageViewBean.parenttitle}"
						required="true" />
			    </ui:define>
			    <ui:define name="compBean2Content">
			    	<h:inputText id="subTitle" value="#{pageViewBean.subtitle}"
						required="true" />
			    </ui:define>
			</ui:decorate>
			
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compBean1Id" value="keyword" />
				<ui:param name="compBean2Id" value="source" />
				<ui:param name="compBean1Lable" value="关键字" />
				<ui:param name="compBean2Lable" value="信息来源" />
				<ui:define name="compBean1Content">
			    	<h:inputText id="keyword" value="#{pageViewBean.keyword}"
					required="true" />
			    </ui:define>
			    <ui:define name="compBean2Content">
			    	<h:inputText id="source" value="#{pageViewBean.source}"
					required="true" />
			    </ui:define>
			</ui:decorate>
			
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compBean1Id" value="author" />
				<ui:param name="compBean1Lable" value="作者" />
				<ui:define name="compBean1Content">
			    	<h:inputText id="author" value="#{pageViewBean.author}"
					required="true" />
			    </ui:define>
			</ui:decorate>
			
			<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compType" value="single-all" />
				<ui:param name="compBean1Id" value="contentBody" />
				<ui:param name="compBean1Lable" value="内容" />
				<ui:define name="compBean1Content">
			    	<h:inputTextarea id="contentBody" styleClass="portal-editor" 
			    	value="#{pageViewBean.contentbody}" />
			    </ui:define>
			</ui:decorate>
		</ui:decorate>
	</ui:define>
	
	<ui:define name="compButtons">
		<p:commandButton actionListener="#{articleContentAction.update}"
			title="保存"
			onstart="SinoPortal.View.updateEditor('#{commonContentViewBean.id}');"
			oncomplete="#{commonContentViewBean.id}_dialog.hide();"
			image="./img/icons/add.png" value="保存" style="margin:5px;"
			update="#{pvb.id}_from:#{pvb.id}_tree">
			<h:inputHidden value="#{pageViewBean.id}" />
			<h:inputHidden value="#{pvb.id}"/>
		</p:commandButton>
		
		<p:commandButton title="关闭"  type="button" onclick="#{commonContentViewBean.id}_dialog.hide();" image="./img/icons/cancel.png"
			value="关闭" style="margin:5px;" />
	</ui:define>

</ui:composition>